package com.dotstone.chipism.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import android.graphics.Color;
import android.util.Log;

import com.dotstone.chipism.R;
import com.dotstone.chipism.bean.Key;

/*************************************************************************
 * 公 司： 深圳市高金科技有限公司 作 者： 深圳市高金科技有限公司 文件名称：KeyManager.java 内容摘要：按键管理工具类类 日 期：
 * 2016-11-28
 ************************************************************************/
public class KeyManager {
	/**
	 * 待用户选择的按键集合
	 */
	private List<Key> mKeyList = new ArrayList<Key>();
	/**
	 * 已完成学习的按键集合
	 */
	private List<Key> mDIYKetList = new ArrayList<Key>();
	/**
	 * key为按键编号 byte[]为指令字节码组 该哈希表可通过按键编号获取所需发送的字节码
	 */
	/**
	 * 按键在布局中的背景资源id 在加载到按键列表时用
	 */
	private int backgroundResId;
	/**
	 * 按键在布局中的图片id 如电源键 是一个电源图标 在加载到按键列表时用
	 */
	private int drawableResId;
	/**
	 * 按键在布局中的文字id 如模式键直接显示“模式”二字 在加载到按键列表时用
	 */
	private int stringResId;
	/**
	 * 需要返回的字节码字符串
	 */
	private static String currentCodeValue;
	/**
	 * 按键实例
	 */
	Key key1, key2, key3, key4, key5, key6, key7, key8, key9, key10, key11, key12, key13, key14, key15, key16, key17,
			key18, key19, key20;
	Key key21, key22, key23, key24, key25, key26, key27, key28, key29, key30, key31, key32, key33, key34, key35, key36,
			key37, key38, key39, key40;
	Key key41, key42, key43, key44, key45, key46, key47, key48, key49, key50, key51, key52, key53, key54, key55, key56,
			key57, key58, key59, key60;
	Key key61, key62, key63, key64, key65, key66, key67, key68, key69, key70, key71, key72, key73, key74, key75, key76,
			key77, key78, key79, key80;
	Key key81, key82, key83, key84, key85, key86, key87, key88, key89, key90, key91, key92, key93, key94, key95, key96,
			key97, key98, key99, key100;
	Key key101, key102, key103, key104, key105, key106, key107, key108, key109, key110, key111, key112, key113, key114,
			key115, key116, key117, key118, key119, key210;

	public HashMap<Integer, String> keyNameMap = new HashMap<Integer, String>();

	private static class SingletonHolder {
		/**
		 * 单例对象实例
		 */
		static final KeyManager mKeyManager = new KeyManager();
	}

	public static KeyManager getInstance() {

		return SingletonHolder.mKeyManager;
	}

	/**
	 * private的构造函数用于避免外界直接使用new来实例化对象
	 */
	private KeyManager() {

	}

	/**
	 * readResolve方法应对单例对象被序列化时候
	 */
	private Object readResolve() {
		return getInstance();
	}

	/**
	 * 方法：clear 用途：清空已学习的按键集合，在进入DIY界面以及退出该界面时调用
	 */
	public void clear() {
		mDIYKetList.clear();
	}

	/**
	 * 方法：getBackGroundResId 用途：在Adapter加载列表布局时，调用该方法，通过按键的编号返回每个按键的背景图片
	 */
	public int getBackGroundResId(int keyNum) {
		if (keyNum > 26 && keyNum < 31) {
			backgroundResId = Color.WHITE;
		} else {
			// backgroundResId = R.drawable.base_round;
		}
		return backgroundResId;
	}

	public void initKeyName() {
		keyNameMap.put(-100, "自定义圆");
		keyNameMap.put(-99, "椭圆形");
		keyNameMap.put(-98, "方形");
		keyNameMap.put(-97, "红色");
		keyNameMap.put(-96, "橙色");
		keyNameMap.put(-95, "黄色");
		keyNameMap.put(-94, "绿色");
		keyNameMap.put(-93, "蓝色");
		keyNameMap.put(-92, "青色");
		keyNameMap.put(-91, "紫色");
		keyNameMap.put(-90, "记忆");
		keyNameMap.put(0, "0");
		keyNameMap.put(1, "1");
		keyNameMap.put(2, "2");
		keyNameMap.put(3, "3");
		keyNameMap.put(4, "4");
		keyNameMap.put(5, "5");
		keyNameMap.put(6, "6");
		keyNameMap.put(7, "7");
		keyNameMap.put(8, "8");
		keyNameMap.put(9, "9");
		keyNameMap.put(800, "打开");
		keyNameMap.put(801, "信源");
		keyNameMap.put(802, "信息");
		keyNameMap.put(803, "回看");
		keyNameMap.put(804, "静音");
		keyNameMap.put(805, "数位");
		keyNameMap.put(806, "返回");
		keyNameMap.put(807, "频道加");
		keyNameMap.put(808, "频道减");
		keyNameMap.put(809, "音量加");
		keyNameMap.put(810, "音量减");
		keyNameMap.put(811, "温度加");
		keyNameMap.put(812, "温度减");
		keyNameMap.put(813, "放大");
		keyNameMap.put(814, "缩小");
		keyNameMap.put(815, "记忆键1");
		keyNameMap.put(816, "记忆键2");
		keyNameMap.put(817, "OK");
		keyNameMap.put(818, "上翻");
		keyNameMap.put(819, "下翻");
		keyNameMap.put(820, "左翻");
		keyNameMap.put(821, "右翻");
		keyNameMap.put(822, "菜单");
		keyNameMap.put(823, "退出");
		keyNameMap.put(824, "前进");
		keyNameMap.put(825, "后退");
		keyNameMap.put(826, "暂停播放");
		keyNameMap.put(827, "停止");
		keyNameMap.put(828, "上一个");
		keyNameMap.put(829, "下一个");
		keyNameMap.put(830, "到顶");
		keyNameMap.put(831, "到底");
		keyNameMap.put(832, "模式");
		keyNameMap.put(833, "风量");
		keyNameMap.put(834, "左右扫风");
		keyNameMap.put(835, "上下扫风");
		keyNameMap.put(836, "摇头");
		keyNameMap.put(837, "风类");
		keyNameMap.put(838, "风速");
		keyNameMap.put(839, "开仓关仓");
		keyNameMap.put(840, "标题");
		keyNameMap.put(841, "加10");
		keyNameMap.put(842, "语言");
		keyNameMap.put(843, "屏幕");
		keyNameMap.put(844, "声道");
		keyNameMap.put(845, "字幕");
		keyNameMap.put(846, "字幕");
		keyNameMap.put(847, "双画面");
		keyNameMap.put(848, "画面冻结");
		keyNameMap.put(849, "重置");
		keyNameMap.put(850, "视频");
		keyNameMap.put(851, "慢放");
		keyNameMap.put(852, "单反主键");
		keyNameMap.put(853, "单反副键");
		keyNameMap.put(854, "连续加");
		keyNameMap.put(855, "连续减");
		keyNameMap.put(856, "连续右");
		keyNameMap.put(857, "连续左");
		keyNameMap.put(870, "风向");
		keyNameMap.put(871, "灯光");
		keyNameMap.put(872, "超强");
		keyNameMap.put(873, "睡眠");
		keyNameMap.put(874, "清新/换气");
		keyNameMap.put(875, "辅热/干燥");
		keyNameMap.put(876, "定时");
		keyNameMap.put(877, "空调加湿");
		keyNameMap.put(878, "负离子");
		keyNameMap.put(879, "节能");
		keyNameMap.put(880, "舒适");
		keyNameMap.put(881, "温度显示");
		keyNameMap.put(882, "一键冷");
		keyNameMap.put(883, "一键热");
		keyNameMap.put(900, "自动");
		keyNameMap.put(901, "信号");
		keyNameMap.put(902, "亮度");
		keyNameMap.put(903, "电脑");
		keyNameMap.put(1000, "冷风");
		keyNameMap.put(1010, "首页");
		keyNameMap.put(1011, "设置");
		keyNameMap.put(1012, "弹出");
		keyNameMap.put(1800, "第二电源键");
		keyNameMap.put(2001, "收藏");
		keyNameMap.put(2002, "数字");
		keyNameMap.put(2003, "扩展");
		keyNameMap.put(4000, "关闭");
		keyNameMap.put(10016, "16度");
		keyNameMap.put(10017, "17度");
		keyNameMap.put(10018, "18度");
		keyNameMap.put(10019, "19度");
		keyNameMap.put(10020, "20度");
		keyNameMap.put(10021, "21度");
		keyNameMap.put(10022, "22度");
		keyNameMap.put(10023, "23度");
		keyNameMap.put(10024, "24度");
		keyNameMap.put(10025, "25度");
		keyNameMap.put(10026, "26度");
		keyNameMap.put(10027, "27度");
		keyNameMap.put(10028, "28度");
		keyNameMap.put(10029, "29度");
		keyNameMap.put(10030, "30度");
		keyNameMap.put(10031, "31度");
		keyNameMap.put(10032, "32度");
		keyNameMap.put(10101, "一档");
		keyNameMap.put(10102, "二档");
		keyNameMap.put(10103, "三档");
		keyNameMap.put(10104, "四档");
		keyNameMap.put(10105, "自动");
		keyNameMap.put(10201, "送风");
		keyNameMap.put(10202, "制冷");
		keyNameMap.put(10203, "制暖");
		keyNameMap.put(10204, "抽湿");
		keyNameMap.put(10205, "自动");
	}

	public String getKeyNameById(int id) {
		Log.i("wmy", id + " " + keyNameMap.get(id));
		return keyNameMap.get(id);
	}

	/**
	 * 方法：getDrawableResId 用途：在Adapter加载列表布局时，调用该方法，通过按键的编号返回每个按键的图标
	 */
	public int getDrawableResId(int keyNum) {
		switch (keyNum) {
		case 800:
			drawableResId = R.drawable.kaiguan12x;
			break;
		case 4000:
			drawableResId = R.drawable.kaiguan22x;
			break;
		case 801:
			drawableResId = R.drawable.selector_tvav;
			break;
		// case 803:
		// drawableResId = R.drawable.selector_return;
		// break;
		case 804:
			drawableResId = R.drawable.shengyin22x;
			break;
		case 806:
			drawableResId = R.drawable.selector_return;
			break;
		case 807:
			drawableResId = R.drawable.selector_tv_up;
			break;
		case 808:
			drawableResId = R.drawable.selector_tv_down;
			break;
		case 809:
			drawableResId = R.drawable.selector_sound_up;
			break;
		case 810:
			drawableResId = R.drawable.selector_sound_down;
			break;
		case 813:
			drawableResId = R.drawable.selector_big;
			break;
		case 814:
			drawableResId = R.drawable.selector_small;
			break;
		case 817:
			drawableResId = R.drawable.selector_ok;
			break;
		case 818:
			drawableResId = R.drawable.menu_up;
			break;
		case 819:
			drawableResId = R.drawable.menu_down;
			break;
		case 820:
			drawableResId = R.drawable.menu_left;
			break;
		case 821:
			drawableResId = R.drawable.menu_right;
			break;
		case 822:
			drawableResId = R.drawable.selector_menu;
			break;
		case 823:
			drawableResId = R.drawable.selector_quit;
			break;
		case 824:
			drawableResId = R.drawable.selector_fast_forward;
			break;
		case 825:
			drawableResId = R.drawable.selector_fast_backward;
			break;
		case 826:
			drawableResId = R.drawable.bofang2x;
			break;
		case 827:
			drawableResId = R.drawable.ting22x;
			break;
		case 828:
			drawableResId = R.drawable.selector_pre;
			break;
		case 829:
			drawableResId = R.drawable.selector_next;
			break;
		case 832:
			drawableResId = R.drawable.selector_mode;
			break;
		case 834:// 水平扫风
			drawableResId = R.drawable.selector_deriction;
			break;
		case 835:
			drawableResId = R.drawable.selector_deriction1;
			break;
		case 836:
			drawableResId = R.drawable.selector_shake;
			break;
		case 837:
			drawableResId = R.drawable.selector_wind_class;
			break;
		case 838:
			drawableResId = R.drawable.selector_wind_speed;
			break;
		case 839:
			drawableResId = R.drawable.selector_pop;
			break;
		case 876:
			drawableResId = R.drawable.selector_time;
			break;
		case 882:
			drawableResId = R.drawable.selector_cold;
			break;
		case 883:
			drawableResId = R.drawable.selector_warm;
			break;
		case 900:
			drawableResId = R.drawable.selector_auto;
			break;
		case 2001:
			drawableResId = R.drawable.selector_collect;
			break;
		case 2002:
			drawableResId = R.drawable.selector_num;
			break;
		case -100:
			drawableResId = R.drawable.selector_d100;
			break;
		case -99:
			drawableResId = R.drawable.selector_d99;
			break;
		case -98:
			drawableResId = R.drawable.selector_d98;
			break;
		case -97:
			drawableResId = R.drawable.selector_d97;
			break;
		case -96:
			drawableResId = R.drawable.selector_d96;
			break;
		case -95:
			drawableResId = R.drawable.selector_d95;
			break;
		case -94:
			drawableResId = R.drawable.selector_d94;
			break;
		case -93:
			drawableResId = R.drawable.selector_d93;
			break;
		case -92:
			drawableResId = R.drawable.selector_d92;
			break;
		case -91:
			drawableResId = R.drawable.selector_d91;
			break;
		case 9999:// 更多选项
			drawableResId = R.drawable.ddd22x;
			break;
		// case 873:// 睡眠
		// drawableResId = R.drawable.yin;
		// break;
		case 875:// 辅热/干燥
			drawableResId = R.drawable.dry;
			break;
		case 1010:
			drawableResId = R.drawable.fangzi22x;
			break;
		case 1011:
			drawableResId = R.drawable.shezhi22x;
			break;
		case 0:
			drawableResId = R.drawable.a0b2x;
			break;
		case 1:
			drawableResId = R.drawable.a1b2x;
			break;
		case 2:
			drawableResId = R.drawable.a2b2x;
			break;
		case 3:
			drawableResId = R.drawable.a3b2x;
			break;
		case 4:
			drawableResId = R.drawable.a4b2x;
			break;
		case 5:
			drawableResId = R.drawable.a5b2x;
			break;
		case 6:
			drawableResId = R.drawable.a6b2x;
			break;
		case 7:
			drawableResId = R.drawable.a7b2x;
			break;
		case 8:
			drawableResId = R.drawable.a8b2x;
			break;
		case 9:
			drawableResId = R.drawable.a9b2x;
			break;
		default:
			break;
		}

		return drawableResId;
	}

	// public String getNameByKeyNum(int keyNum) {
	// String name = null;
	// name = mNum_Name_Map.get(keyNum);
	// if (name != null) {
	// return name;
	// } else {
	// return "未知";
	// }
	// }

	public int getContentTypeByKeyNum(int keyNum) {
		int contentType = 2;// 文字是1 图片是0
		switch (keyNum) {
		case 800:
		case 4000:
		case 801:
			// case 802:
			// case 803:
		case 804:
		case 806:
		case 807:
		case 808:
		case 809:
		case 810:
		case 813:
		case 814:
		case 817:
		case 818:
		case 819:
		case 820:
		case 821:
		case 822:
		case 823:
		case 824:
		case 825:
		case 826:
		case 827:
		case 828:
		case 829:
		case 832:
		case 834:
		case 835:
		case 836:
		case 837:
		case 838:
		case 839:
		case 876:
		case 882:
		case 883:
		case 900:
		case 1010:
		case 1011:
		case 2001:
		case 2002:
		case 3001:
		case 3002:
		case 3007:
		case 3008:
		case 3009:
		case 3010:
		case 3011:
		case 3012:
		case 3013:
		case -100:
		case -99:
		case -98:
		case -97:
		case -96:
		case -95:
		case -94:
		case -93:
		case -92:
		case -91:
		case 0:
		case 1:
		case 2:
		case 3:
		case 4:
		case 5:
		case 6:
		case 7:
		case 8:
		case 9:
			contentType = 0;
			break;
		case 802:
		case 803:
		case 805:
		case 811:
		case 812:
			// case 813:
			// case 814:
		case 815:
		case 816:
			// case 827:
			// case 828:
			// case 829:
		case 830:
		case 831:
			// case 832:
		case 833:
			// case 836:
			// case 837:
			// case 838:
			// case 839:
		case 840:
		case 841:
		case 842:
		case 843:
		case 844:
		case 845:
		case 846:
		case 847:
		case 848:
		case 849:
		case 850:
		case 851:
		case 852:
		case 853:
		case 854:
		case 855:
		case 856:
		case 857:
		case 870:
		case 871:
		case 872:
		case 873:
		case 874:
		case 875:
		case 877:
		case 878:
		case 879:
		case 880:
		case 881:
			// case 900:
		case 901:
		case 902:
		case 903:
		case 1000:
		case 1800:
		case 2003:
		case 3003:
		case 3004:
		case 3005:
		case 3006:
			contentType = 1;
			break;

		default:
			break;
		}

		return contentType;
	}

	/**
	 * 方法：getStringResId 用途：在Adapter加载列表布局时，调用该方法，通过按键的编号返回每个按键的文字描述
	 */
	public int getStringResId(int type) {
		switch (type) {
		case 802:
			stringResId = R.string.shortmessage;
			break;
		case 803:
			stringResId = R.string.backlook;
			break;
		case 805:
			stringResId = R.string.numposition;
			break;
		case 811:
			stringResId = R.string.tempup;
			break;
		case 812:
			stringResId = R.string.tempdown;
			break;
		// case 813:
		// stringResId = R.string.bigger;
		// break;
		// case 814:
		// stringResId = R.string.smaller;
		// break;
		case 815:

			stringResId = R.string.memory1;
			break;
		case 816:
			stringResId = R.string.memory2;
			break;
		// case 822:
		// stringResId = R.string.menu;
		// break;
		// case 823:
		// stringResId = R.string.exit;
		// break;
		// case 824:
		// stringResId = R.string.goto1;
		// break;
		// case 825:
		// stringResId = R.string.back;
		// break;
		// case 826:
		// stringResId = R.string.pauseplay;
		// break;
		// case 827:
		// stringResId = R.string.stop;
		// break;
		// case 828:
		// stringResId = R.string.pre;
		// break;
		// case 829:
		// stringResId = R.string.next;
		// break;
		case 830:
			stringResId = R.string.top;
			break;
		case 831:
			stringResId = R.string.bottom;
			break;
		// case 832:
		// stringResId = R.string.mode;
		// break;
		case 833:
			stringResId = R.string.wind;
			break;
		// case 836:
		// stringResId = R.string.shookhead;
		// break;
		// case 837:
		// stringResId = R.string.windclass;
		// break;
		// case 838:
		// stringResId = R.string.windspeed;
		// break;
		case 839:
			stringResId = R.string.openclosecdbox;
			break;
		case 840:
			stringResId = R.string.title;
			break;
		case 841:
			stringResId = R.string.add10;
			break;
		case 842:
			stringResId = R.string.lanauge;
			break;
		case 843:
			stringResId = R.string.screen;
			break;
		case 844:
			stringResId = R.string.track;
			break;
		case 845:
			stringResId = R.string.subtitle;
			break;
		case 846:
			stringResId = R.string.subtitle;
			break;
		case 847:
			stringResId = R.string.split;
			break;
		case 848:
			stringResId = R.string.screen_froze;
			break;
		case 849:
			stringResId = R.string.reset;
			break;
		case 850:
			stringResId = R.string.vedio;
			break;
		case 851:
			stringResId = R.string.slowplay;
			break;
		case 852:
			stringResId = R.string.mainkey;
			break;
		case 853:
			stringResId = R.string.assistant;
			break;
		case 854:
			stringResId = R.string.contadd;
			break;
		case 855:
			stringResId = R.string.contminus;
			break;
		case 856:
			stringResId = R.string.contright;
			break;
		case 857:
			stringResId = R.string.contleft;
			break;
		case 870:
			stringResId = R.string.winddirect;
			break;
		case 871:
			stringResId = R.string.light;
			break;
		case 872:
			stringResId = R.string.superpower;
			break;
		case 873:
			stringResId = R.string.sleep;
			break;
		case 874:
			stringResId = R.string.fresh_trans;
			break;
		case 875:
			stringResId = R.string.sup_heat;
			break;
		case 877:
			stringResId = R.string.add_wet;
			break;
		case 878:
			stringResId = R.string.anion;
			break;
		case 879:
			stringResId = R.string.save_power;
			break;
		case 880:
			stringResId = R.string.comfort;
			break;
		case 881:
			stringResId = R.string.temp_show;
			break;
		// case 900:
		// stringResId = R.string.auto;
		// break;
		case 901:
			stringResId = R.string.sign;
			break;
		case 902:
			stringResId = R.string.light_per;
			break;
		case 903:
			stringResId = R.string.computer;
			break;
		case 1000:
			stringResId = R.string.cold_wind;
			break;
		// case 1010:
		// stringResId = R.string.main_page;
		// break;
		// case 1011:
		// stringResId = R.string.setting;
		// break;
		case 1800:
			stringResId = R.string.sec_power;
			break;
		case 2002:
			stringResId = R.string.num_btn;
			break;
		case 2003:
			stringResId = R.string.extend_diy;
			break;
		case 3003:
			stringResId = R.string.light_add;
			break;
		case 3004:
			stringResId = R.string.light_weak;
			break;
		case 3005:
			stringResId = R.string.cw_add;
			break;
		case 3006:
			stringResId = R.string.cw_weak;
			break;
		// case 0:
		// stringResId = R.string.num0;
		// break;
		// case 1:
		// stringResId = R.string.num1;
		// break;
		// case 2:
		// stringResId = R.string.num2;
		// break;
		// case 3:
		// stringResId = R.string.num3;
		// break;
		// case 4:
		// stringResId = R.string.num4;
		// break;
		// case 5:
		// stringResId = R.string.num5;
		// break;
		// case 6:
		// stringResId = R.string.num6;
		// break;
		// case 7:
		// stringResId = R.string.num7;
		// break;
		// case 8:
		// stringResId = R.string.num8;
		// break;
		// case 9:
		// stringResId = R.string.num9;
		// break;
		default:
			break;
		}

		return stringResId;
	}

	/**
	 * 方法：getFanKey 用途：DIY风扇遥控器时供用户选择所需学习的按键集合
	 */
	public List<Key> getFanKey() {
		mKeyList.clear();
		key1 = new Key("打开", 0, 800, false);
		key2 = new Key("关闭", 0, 4000, false);
		// key3 = new Key("静音", 0, 804, false);
		key4 = new Key("模式", 0, 832, false);
		key5 = new Key("摇头", 0, 836, false);
		key6 = new Key("风类", 0, 837, false);
		key7 = new Key("风速", 0, 838, false);
		// key8 = new Key("连续+", 1, 854, false);
		// key9 = new Key("连续-", 1, 855, false);
		// key10 = new Key("连续右", 1, 856, false);
		// key11 = new Key("连续左", 1, 857, false);
		// key12 = new Key("灯光", 1, 871, false);
		// key13 = new Key("睡眠", 1, 873, false);
		key14 = new Key("定时", 0, 876, false);
		key15 = new Key("负离子", 1, 878, false);
		// key16 = new Key("冷风", 1, 1000, false);
		// key17 = new Key("数字", 1, 2002, false);
		// key18 = new Key("扩展", 1, 2003, false);
		// key19 = new Key("自定义——圆形", 0, -100, false);
		// key20 = new Key("自定义——椭圆", 0, -99, false);
		// key21 = new Key("自定义——方形", 0, -98, false);
		// key22 = new Key("自定义——红色", 0, -97, false);
		// key23 = new Key("自定义——橙色", 0, -96, false);
		// key24 = new Key("自定义——黄色", 0, -95, false);
		// key25 = new Key("自定义——绿色", 0, -94, false);
		// key26 = new Key("自定义——蓝色", 0, -93, false);
		// key27 = new Key("自定义——青色", 0, -92, false);
		// key28 = new Key("自定义——紫色", 0, -91, false);
		// key29 = new Key("数字0", 0, 0, false);
		// key30 = new Key("数字1", 1, 1, false);
		// key31 = new Key("数字2", 2, 2, false);
		// key32 = new Key("数字3", 3, 3, false);
		// key33 = new Key("数字4", 4, 4, false);
		// key34 = new Key("数字5", 5, 5, false);
		// key35 = new Key("数字6", 6, 6, false);
		// key36 = new Key("数字7", 7, 7, false);
		// key37 = new Key("数字8", 8, 8, false);
		// key38 = new Key("数字9", 9, 9, false);
		mKeyList.add(key1);
		mKeyList.add(key2);
		// mKeyList.add(key3);
		mKeyList.add(key4);
		mKeyList.add(key5);
		mKeyList.add(key6);
		mKeyList.add(key7);
		// mKeyList.add(key8);
		// mKeyList.add(key9);
		// mKeyList.add(key10);
		// mKeyList.add(key11);
		// mKeyList.add(key12);
		// mKeyList.add(key13);
		mKeyList.add(key14);
		mKeyList.add(key15);
		// mKeyList.add(key16);
		// mKeyList.add(key17);
		// mKeyList.add(key18);
		// mKeyList.add(key19);
		// mKeyList.add(key20);
		// mKeyList.add(key21);
		// mKeyList.add(key22);
		// mKeyList.add(key23);
		// mKeyList.add(key24);
		// mKeyList.add(key25);
		// mKeyList.add(key26);
		// mKeyList.add(key27);
		// mKeyList.add(key28);
		// mKeyList.add(key29);
		// mKeyList.add(key30);
		// mKeyList.add(key31);
		// mKeyList.add(key32);
		// mKeyList.add(key33);
		// mKeyList.add(key34);
		// mKeyList.add(key35);
		// mKeyList.add(key36);
		// mKeyList.add(key37);
		// mKeyList.add(key38);
		return mKeyList;
	}

	/**
	 * 方法：getAirCondKey 用途：DIY空调遥控器时供用户选择的按键集合
	 */
	public List<Key> getAirCondKey() {
		mKeyList.clear();
		key1 = new Key("打开", 0, 800, false);
		key2 = new Key("关闭", 0, 4000, false);
		key3 = new Key("静音", 0, 804, false);
		key4 = new Key("温度+", 1, 811, false);
		key5 = new Key("温度-", 1, 812, false);
		key6 = new Key("模式", 0, 832, false);
		key7 = new Key("风量", 0, 833, false);
		key8 = new Key("左右扫风", 0, 834, false);
		key9 = new Key("上下扫风", 0, 835, false);
		// key10 = new Key("连续+", 1, 854, false);
		// key11 = new Key("连续-", 1, 855, false);
		// key12 = new Key("连续左", 1, 856, false);
		// key13 = new Key("连续右", 1, 857, false);
		// key14 = new Key("空调风向", 1, 870, false);
		// key15 = new Key("灯光", 1, 871, false);
		// key16 = new Key("超强", 1, 872, false);
		// key17 = new Key("睡眠", 1, 873, false);
		// key18 = new Key("清新/换气", 1, 874, false);
		// key19 = new Key("辅热/干燥",0, 875, false);
		key20 = new Key("定时", 0, 876, false);
		// key21 = new Key("加湿", 1, 877, false);
		// key22 = new Key("负离子", 1, 878, false);
		// key23 = new Key("节能", 1, 879, false);
		// key24 = new Key("舒适", 1, 880, false);
		// key25 = new Key("温度显示", 1, 881, false);
		key26 = new Key("一键冷", 0, 882, false);
		key27 = new Key("一键热", 0, 883, false);
		// key28 = new Key("首页", 1, 1010, false);
		// key29 = new Key("扩展", 1, 2003, false);
		// key30 = new Key("自定义——圆形", 0, -100, false);
		// key31 = new Key("自定义——椭圆", 0, -99, false);
		// key32 = new Key("自定义——方形", 0, -98, false);
		// key33 = new Key("自定义——红色", 0, -97, false);
		// key34 = new Key("自定义——橙色", 0, -96, false);
		// key35 = new Key("自定义——黄色", 0, -95, false);
		// key36 = new Key("自定义——绿色", 0, -94, false);
		// key37 = new Key("自定义——蓝色", 0, -93, false);
		// key38 = new Key("自定义——青色", 0, -92, false);
		// key39 = new Key("自定义——紫色", 0, -91, false);
		mKeyList.add(key1);
		mKeyList.add(key2);
		mKeyList.add(key3);
		mKeyList.add(key4);
		mKeyList.add(key5);
		mKeyList.add(key6);
		mKeyList.add(key7);
		mKeyList.add(key8);
		mKeyList.add(key9);
		// mKeyList.add(key10);
		// mKeyList.add(key11);
		// mKeyList.add(key12);
		// mKeyList.add(key13);
		// mKeyList.add(key14);
		// mKeyList.add(key15);
		// mKeyList.add(key16);
		// mKeyList.add(key17);
		// mKeyList.add(key18);
		// mKeyList.add(key19);
		mKeyList.add(key20);
		// mKeyList.add(key21);
		// mKeyList.add(key22);
		// mKeyList.add(key23);
		// mKeyList.add(key24);
		// mKeyList.add(key25);
		mKeyList.add(key26);
		mKeyList.add(key27);
		// mKeyList.add(key28);
		// mKeyList.add(key29);
		// mKeyList.add(key30);
		// mKeyList.add(key31);
		// mKeyList.add(key32);
		// mKeyList.add(key33);
		// mKeyList.add(key34);
		// mKeyList.add(key35);
		// mKeyList.add(key36);
		// mKeyList.add(key37);
		// mKeyList.add(key38);
		// mKeyList.add(key39);
		Log.i("Tag", "调用了获取空调遥控器的方法" + mKeyList.size());
		return mKeyList;
	}

	/**
	 * 方法：getTVKey 用途：DIY电视遥控器时返回的供用户选择的按键集合
	 */
	public List<Key> getTVKey() {
		mKeyList.clear();
		key1 = new Key("打开", 0, 800, false);
		key48 = new Key("关闭", 0, 4000, false);
		key2 = new Key("信源", 0, 801, false);
		// key3 = new Key("信息", 0, 802, false);
		key4 = new Key("回看", 0, 803, false);
		key5 = new Key("静音", 0, 804, false);
		key6 = new Key("数位", 1, 805, false);
		key7 = new Key("返回", 0, 806, false);
		key8 = new Key("频道+", 0, 807, false);
		key9 = new Key("频道-", 0, 808, false);
		key10 = new Key("音量+", 0, 809, false);
		key11 = new Key("音量-", 0, 810, false);
		key12 = new Key("记忆键1", 1, 815, false);
		key13 = new Key("记忆键 2", 1, 816, false);
		key14 = new Key("OK", 0, 817, false);
		key15 = new Key("菜单", 0, 822, false);
		key16 = new Key("上翻", 0, 818, false);
		key17 = new Key("下翻", 0, 819, false);
		key18 = new Key("左翻", 0, 820, false);
		key19 = new Key("右翻", 0, 821, false);
		key20 = new Key("退出", 0, 823, false);
		// key21 = new Key("连续+", 1, 854, false);
		// key22 = new Key("连续-", 1, 855, false);
		// key23 = new Key("连续右", 1, 856, false);
		// key24 = new Key("连续左", 1, 857, false);
		key25 = new Key("收藏", 0, 2001, false);
		key26 = new Key("数字", 0, 2002, false);
		// key27 = new Key("扩展", 1, 2003, false);
		// key28 = new Key("自定义——圆形", 0, -100, false);
		// key29 = new Key("自定义——椭圆", 0, -99, false);
		// key30 = new Key("自定义——方形", 0, -98, false);
		// key31 = new Key("自定义——红色", 0, -97, false);
		// key32 = new Key("自定义——橙色", 0, -96, false);
		// key33 = new Key("自定义——黄色", 0, -95, false);
		// key34 = new Key("自定义——绿色", 0, -94, false);
		// key35 = new Key("自定义——蓝色", 0, -93, false);
		// key36 = new Key("自定义——青色", 0, -92, false);
		// key37 = new Key("自定义——紫色", 0, -91, false);
		key38 = new Key("数字0", 0, 0, false);
		key39 = new Key("数字1", 0, 1, false);
		key40 = new Key("数字2", 0, 2, false);
		key41 = new Key("数字3", 0, 3, false);
		key42 = new Key("数字4", 0, 4, false);
		key43 = new Key("数字5", 0, 5, false);
		key44 = new Key("数字6", 0, 6, false);
		key45 = new Key("数字7", 0, 7, false);
		key46 = new Key("数字8", 0, 8, false);
		key47 = new Key("数字9", 0, 9, false);
		mKeyList.add(key1);
		mKeyList.add(key48);
		mKeyList.add(key2);
		// mKeyList.add(key3);
		mKeyList.add(key8);
		mKeyList.add(key9);
		mKeyList.add(key10);
		mKeyList.add(key11);
		mKeyList.add(key14);
		mKeyList.add(key15);
		mKeyList.add(key16);
		mKeyList.add(key17);
		mKeyList.add(key18);
		mKeyList.add(key19);
		mKeyList.add(key20);
		// mKeyList.add(key21);
		// mKeyList.add(key22);
		// mKeyList.add(key23);
		// mKeyList.add(key24);
		mKeyList.add(key25);
		mKeyList.add(key26);
		// mKeyList.add(key27);
		// mKeyList.add(key28);
		// mKeyList.add(key29);
		// mKeyList.add(key30);
		// mKeyList.add(key31);
		// mKeyList.add(key32);
		// mKeyList.add(key33);
		// mKeyList.add(key34);
		// mKeyList.add(key35);
		// mKeyList.add(key36);
		// mKeyList.add(key37);
		mKeyList.add(key38);
		mKeyList.add(key39);
		mKeyList.add(key40);
		mKeyList.add(key41);
		mKeyList.add(key42);
		mKeyList.add(key43);
		mKeyList.add(key44);
		mKeyList.add(key45);
		mKeyList.add(key46);
		mKeyList.add(key47);
		mKeyList.add(key4);
		mKeyList.add(key5);
		mKeyList.add(key6);
		mKeyList.add(key7);
		mKeyList.add(key12);
		mKeyList.add(key13);

		return mKeyList;
	}

	/**
	 * 方法：getSeteliteKey 用途：DIY卫星/机顶盒时返回的按键集合
	 */
	public List<Key> getSeteliteKey() {
		mKeyList.clear();
		key1 = new Key("打开", 0, 800, false);
		key2 = new Key("关闭", 0, 4000, false);
		key3 = new Key("静音", 0, 804, false);
		key4 = new Key("返回", 1, 806, false);
		key5 = new Key("音量+", 0, 809, false);
		key6 = new Key("音量-", 0, 810, false);
		key7 = new Key("放大", 0, 813, false);
		key8 = new Key("缩小", 0, 814, false);
		key9 = new Key("OK", 0, 817, false);
		key10 = new Key("上翻", 0, 818, false);
		key11 = new Key("下翻", 0, 819, false);
		key12 = new Key("左翻", 0, 820, false);
		key13 = new Key("右翻", 0, 821, false);
		key14 = new Key("菜单", 1, 822, false);
		key15 = new Key("退出", 1, 823, false);
		key16 = new Key("分屏", 1, 847, false);
		key17 = new Key("冻结", 1, 848, false);
		key18 = new Key("重置", 1, 849, false);
		key19 = new Key("视频", 1, 850, false);
		key20 = new Key("连续+", 1, 854, false);
		key21 = new Key("连续-", 1, 855, false);
		key22 = new Key("连续右", 1, 856, false);
		key23 = new Key("连续左", 1, 857, false);
		key24 = new Key("自动", 1, 900, false);
		key25 = new Key("信号", 1, 901, false);
		key26 = new Key("亮度", 1, 902, false);
		key27 = new Key("电脑", 1, 903, false);
		key28 = new Key("数字", 1, 2002, false);
		// key29 = new Key("扩展", 1, 2003, false);
		// key30 = new Key("自定义——圆形", 0, -100, false);
		// key31 = new Key("自定义——椭圆", 0, -99, false);
		// key32 = new Key("自定义——方形", 0, -98, false);
		// key33 = new Key("自定义——红色", 0, -97, false);
		// key34 = new Key("自定义——橙色", 0, -96, false);
		// key35 = new Key("自定义——黄色", 0, -95, false);
		// key36 = new Key("自定义——绿色", 0, -94, false);
		// key37 = new Key("自定义——蓝色", 0, -93, false);
		// key38 = new Key("自定义——青色", 0, -92, false);
		// key39 = new Key("自定义——紫色", 0, -91, false);
		key40 = new Key("记忆键", 1, -90, false);
		mKeyList.add(key1);
		mKeyList.add(key2);
		mKeyList.add(key3);
		mKeyList.add(key4);
		mKeyList.add(key5);
		mKeyList.add(key6);
		mKeyList.add(key7);
		mKeyList.add(key8);
		mKeyList.add(key9);
		mKeyList.add(key10);
		mKeyList.add(key11);
		mKeyList.add(key12);
		mKeyList.add(key13);
		mKeyList.add(key14);
		mKeyList.add(key15);
		mKeyList.add(key16);
		mKeyList.add(key17);
		mKeyList.add(key18);
		mKeyList.add(key19);
		mKeyList.add(key20);
		mKeyList.add(key21);
		mKeyList.add(key22);
		mKeyList.add(key23);
		mKeyList.add(key24);
		mKeyList.add(key25);
		mKeyList.add(key26);
		mKeyList.add(key27);
		mKeyList.add(key28);
		// mKeyList.add(key29);
		// mKeyList.add(key30);
		// mKeyList.add(key31);
		// mKeyList.add(key32);
		// mKeyList.add(key33);
		// mKeyList.add(key34);
		// mKeyList.add(key35);
		// mKeyList.add(key36);
		// mKeyList.add(key37);
		// mKeyList.add(key38);
		// mKeyList.add(key39);
		mKeyList.add(key40);
		return mKeyList;
	}

	/**
	 * 方法：getBoxKey 用途：DIY盒子时返回的供用户选择的按键集合
	 */
	public List<Key> getBoxKey() {
		mKeyList.clear();
		key1 = new Key("打开", 0, 800, false);
		key2 = new Key("关闭", 0, 4000, false);
		// key3 = new Key("信息", 1, 802, false);
		// key4 = new Key("回看", 0, 803, false);
		key5 = new Key("静音", 0, 804, false);
		key6 = new Key("数位", 1, 805, false);
		key7 = new Key("返回", 0, 806, false);
		key8 = new Key("频道+", 0, 807, false);
		key9 = new Key("频道-", 0, 808, false);
		key10 = new Key("音量+", 0, 809, false);
		key11 = new Key("音量-", 0, 810, false);
		key12 = new Key("OK", 0, 817, false);
		key13 = new Key("上翻", 0, 818, false);
		key14 = new Key("下翻", 0, 819, false);
		key15 = new Key("左翻", 0, 820, false);
		key16 = new Key("右翻", 0, 821, false);
		key17 = new Key("菜单", 0, 822, false);
		key18 = new Key("前进", 0, 824, false);
		key19 = new Key("后退", 0, 825, false);
		key20 = new Key("暂停/播放", 0, 826, false);
		key21 = new Key("停止", 0, 827, false);
		key22 = new Key("上一个", 0, 828, false);
		key23 = new Key("下一个", 0, 829, false);
		// key24 = new Key("顶部", 1, 830, false);
		// key25 = new Key("底部", 1, 831, false);
		// key26 = new Key("连续+", 1, 854, false);
		// key27 = new Key("连续-", 1, 855, false);
		// key28 = new Key("连续右", 1, 856, false);
		// key29 = new Key("连续左", 1, 857, false);
		key30 = new Key("首页", 0, 1010, false);
		key31 = new Key("设置", 0, 1011, false);
		// key32 = new Key("扩展", 1, 2003, false);
		// key33 = new Key("自定义——圆形", 0, -100, false);
		// key34 = new Key("自定义——椭圆", 0, -99, false);
		// key35 = new Key("自定义——方形", 0, -98, false);
		// key36 = new Key("自定义——红色", 0, -97, false);
		// key37 = new Key("自定义——橙色", 0, -96, false);
		// key38 = new Key("自定义——黄色", 0, -95, false);
		// key39 = new Key("自定义——绿色", 0, -94, false);
		// key40 = new Key("自定义——蓝色", 0, -93, false);
		// key41 = new Key("自定义——青色", 0, -92, false);
		// key42 = new Key("自定义——紫色", 0, -91, false);
		key43 = new Key("数字0", 0, 0, false);
		key44 = new Key("数字1", 0, 1, false);
		key45 = new Key("数字2", 0, 2, false);
		key46 = new Key("数字3", 0, 3, false);
		key47 = new Key("数字4", 0, 4, false);
		key48 = new Key("数字5", 0, 5, false);
		key49 = new Key("数字6", 0, 6, false);
		key50 = new Key("数字7", 0, 7, false);
		key51 = new Key("数字8", 0, 8, false);
		key52 = new Key("数字9", 0, 9, false);
		mKeyList.add(key1);
		mKeyList.add(key2);
		// mKeyList.add(key3);
		// mKeyList.add(key4);
		mKeyList.add(key5);
		mKeyList.add(key6);
		mKeyList.add(key7);
		mKeyList.add(key8);
		mKeyList.add(key9);
		mKeyList.add(key10);
		mKeyList.add(key11);
		mKeyList.add(key12);
		mKeyList.add(key13);
		mKeyList.add(key14);
		mKeyList.add(key15);
		mKeyList.add(key16);
		mKeyList.add(key17);
		mKeyList.add(key18);
		mKeyList.add(key19);
		mKeyList.add(key20);
		mKeyList.add(key21);
		mKeyList.add(key22);
		mKeyList.add(key23);
		// mKeyList.add(key24);
		// mKeyList.add(key25);
		// mKeyList.add(key26);
		// mKeyList.add(key27);
		// mKeyList.add(key28);
		// mKeyList.add(key29);
		mKeyList.add(key30);
		mKeyList.add(key31);
		// mKeyList.add(key32);
		// mKeyList.add(key33);
		// mKeyList.add(key34);
		// mKeyList.add(key35);
		// mKeyList.add(key36);
		// mKeyList.add(key37);
		// mKeyList.add(key38);
		// mKeyList.add(key39);
		// mKeyList.add(key40);
		// mKeyList.add(key41);
		// mKeyList.add(key42);
		mKeyList.add(key43);
		mKeyList.add(key44);
		mKeyList.add(key45);
		mKeyList.add(key46);
		mKeyList.add(key47);
		mKeyList.add(key48);
		mKeyList.add(key49);
		mKeyList.add(key50);
		mKeyList.add(key51);
		mKeyList.add(key52);
		return mKeyList;
	}

	/**
	 * 方法：getProjectorKey 用途：DIY投影仪时返回的供用户选择的按键集合
	 */
	public List<Key> getProjectorKey() {
		mKeyList.clear();
		key1 = new Key("打开", 0, 800, false);
		key2 = new Key("关闭", 0, 4000, false);
		key3 = new Key("静音", 0, 804, false);
		key4 = new Key("返回", 0, 806, false);
		key5 = new Key("音量+", 0, 809, false);
		key6 = new Key("音量-", 0, 810, false);
		key7 = new Key("放大", 0, 813, false);
		key8 = new Key("缩小", 0, 814, false);
		key9 = new Key("OK", 0, 817, false);
		key10 = new Key("上翻", 0, 818, false);
		key11 = new Key("下翻", 0, 819, false);
		key12 = new Key("左翻", 0, 820, false);
		key13 = new Key("右翻", 0, 821, false);
		key14 = new Key("菜单", 0, 822, false);
		key15 = new Key("退出", 0, 823, false);
		key16 = new Key("分屏", 1, 847, false);
		key17 = new Key("冻结", 1, 848, false);
		key18 = new Key("重置", 1, 849, false);
		key19 = new Key("视频", 1, 850, false);
		// key20 = new Key("连续+", 1, 854, false);
		// key21 = new Key("连续-", 1, 855, false);
		// key22 = new Key("连续右", 1, 856, false);
		// key23 = new Key("连续左", 1, 857, false);
		key24 = new Key("自动", 1, 900, false);
		key25 = new Key("信号", 1, 901, false);
		key26 = new Key("亮度", 1, 902, false);
		key27 = new Key("电脑", 1, 903, false);
		key28 = new Key("数字", 0, 2002, false);
		// key29 = new Key("扩展", 1, 2003, false);
		// key30 = new Key("自定义——圆形", 0, -100, false);
		// key31 = new Key("自定义——椭圆", 0, -99, false);
		// key32 = new Key("自定义——方形", 0, -98, false);
		// key33 = new Key("自定义——红色", 0, -97, false);
		// key34 = new Key("自定义——橙色", 0, -96, false);
		// key35 = new Key("自定义——黄色", 0, -95, false);
		// key36 = new Key("自定义——绿色", 0, -94, false);
		// key37 = new Key("自定义——蓝色", 0, -93, false);
		// key38 = new Key("自定义——青色", 0, -92, false);
		// key39 = new Key("自定义——紫色", 0, -91, false);
		key40 = new Key("记忆键", 0, -90, false);
		key43 = new Key("数字0", 1, 0, false);
		key44 = new Key("数字1", 1, 1, false);
		key45 = new Key("数字2", 1, 2, false);
		key46 = new Key("数字3", 1, 3, false);
		key47 = new Key("数字4", 1, 4, false);
		key48 = new Key("数字5", 1, 5, false);
		key49 = new Key("数字6", 1, 6, false);
		key50 = new Key("数字7", 1, 7, false);
		key51 = new Key("数字8", 1, 8, false);
		key52 = new Key("数字9", 1, 9, false);
		mKeyList.add(key1);
		mKeyList.add(key2);
		mKeyList.add(key3);
		mKeyList.add(key4);
		mKeyList.add(key5);
		mKeyList.add(key6);
		mKeyList.add(key7);
		mKeyList.add(key8);
		mKeyList.add(key9);
		mKeyList.add(key10);
		mKeyList.add(key11);
		mKeyList.add(key12);
		mKeyList.add(key13);
		mKeyList.add(key14);
		mKeyList.add(key15);
		mKeyList.add(key16);
		mKeyList.add(key17);
		mKeyList.add(key18);
		mKeyList.add(key19);
		// mKeyList.add(key20);
		// mKeyList.add(key21);
		// mKeyList.add(key22);
		// mKeyList.add(key23);
		mKeyList.add(key24);
		mKeyList.add(key25);
		mKeyList.add(key26);
		mKeyList.add(key27);
		mKeyList.add(key28);
		// mKeyList.add(key29);
		// mKeyList.add(key30);
		// mKeyList.add(key31);
		// mKeyList.add(key32);
		// mKeyList.add(key33);
		// mKeyList.add(key34);
		// mKeyList.add(key35);
		// mKeyList.add(key36);
		// mKeyList.add(key37);
		// mKeyList.add(key38);
		// mKeyList.add(key39);
		mKeyList.add(key43);
		mKeyList.add(key44);
		mKeyList.add(key45);
		mKeyList.add(key46);
		mKeyList.add(key47);
		mKeyList.add(key48);
		mKeyList.add(key49);
		mKeyList.add(key50);
		mKeyList.add(key51);
		mKeyList.add(key52);
		mKeyList.add(key40);
		return mKeyList;
	}

	/**
	 * 方法：getAirFreshKey 用途：DIY空气净化器时返回的供用户选择的按键集合
	 */
	public List<Key> getAirFreshKey() {
		mKeyList.clear();
		key1 = new Key("打开", 0, 800, false);
		key2 = new Key("关闭", 0, 4000, false);
		key3 = new Key("频道+", 0, 807, false);
		key4 = new Key("频道-", 0, 808, false);
		key5 = new Key("音量+", 0, 809, false);
		key6 = new Key("音量-", 0, 810, false);
		key7 = new Key("温度+", 1, 811, false);
		key8 = new Key("温度-", 1, 812, false);
		key9 = new Key("放大", 0, 813, false);
		key10 = new Key("缩小", 0, 814, false);
		key11 = new Key("OK", 0, 817, false);
		key12 = new Key("上翻", 0, 818, false);
		key13 = new Key("下翻", 0, 819, false);
		key14 = new Key("左翻", 0, 820, false);
		key15 = new Key("右翻", 0, 821, false);
		key16 = new Key("前进", 1, 824, false);
		key17 = new Key("后退", 1, 825, false);
		key18 = new Key("暂停/播放", 1, 826, false);
		key19 = new Key("停止", 1, 827, false);
		key20 = new Key("顶部", 1, 830, false);
		key21 = new Key("底部", 1, 831, false);
		key22 = new Key("连续+", 1, 854, false);
		key23 = new Key("连续-", 1, 855, false);
		key24 = new Key("连续右", 1, 856, false);
		key25 = new Key("连续左", 1, 857, false);
		key26 = new Key("数字", 1, 2002, false);
		// key27 = new Key("扩展", 1, 2003, false);
		// key28 = new Key("自定义——圆形", 0, -100, false);
		// key29 = new Key("自定义——椭圆", 0, -99, false);
		// key30 = new Key("自定义——方形", 0, -98, false);
		// key31 = new Key("自定义——红色", 0, -97, false);
		// key32 = new Key("自定义——橙色", 0, -96, false);
		// key33 = new Key("自定义——黄色", 0, -95, false);
		// key34 = new Key("自定义——绿色", 0, -94, false);
		// key35 = new Key("自定义——蓝色", 0, -93, false);
		// key36 = new Key("自定义——青色", 0, -92, false);
		// key37 = new Key("自定义——紫色", 0, -91, false);
		key38 = new Key("记忆键", 0, -90, false);
		key39 = new Key("数字0", 0, 0, false);
		key40 = new Key("数字1", 0, 1, false);
		key41 = new Key("数字2", 0, 2, false);
		key42 = new Key("数字3", 0, 3, false);
		key43 = new Key("数字4", 0, 4, false);
		key44 = new Key("数字5", 0, 5, false);
		key45 = new Key("数字6", 0, 6, false);
		key46 = new Key("数字7", 0, 7, false);
		key47 = new Key("数字8", 0, 8, false);
		key48 = new Key("数字9", 0, 9, false);
		mKeyList.add(key1);
		mKeyList.add(key2);
		mKeyList.add(key3);
		mKeyList.add(key4);
		mKeyList.add(key5);
		mKeyList.add(key6);
		mKeyList.add(key7);
		mKeyList.add(key8);
		mKeyList.add(key9);
		mKeyList.add(key10);
		mKeyList.add(key11);
		mKeyList.add(key12);
		mKeyList.add(key13);
		mKeyList.add(key14);
		mKeyList.add(key15);
		mKeyList.add(key16);
		mKeyList.add(key17);
		mKeyList.add(key18);
		mKeyList.add(key19);
		mKeyList.add(key20);
		mKeyList.add(key21);
		mKeyList.add(key22);
		mKeyList.add(key23);
		mKeyList.add(key24);
		mKeyList.add(key25);
		mKeyList.add(key26);
		// mKeyList.add(key27);
		mKeyList.add(key28);
		mKeyList.add(key29);
		mKeyList.add(key30);
		mKeyList.add(key31);
		mKeyList.add(key32);
		mKeyList.add(key33);
		mKeyList.add(key34);
		mKeyList.add(key35);
		mKeyList.add(key36);
		mKeyList.add(key37);
		mKeyList.add(key38);
		mKeyList.add(key39);
		mKeyList.add(key40);
		mKeyList.add(key41);
		mKeyList.add(key42);
		mKeyList.add(key43);
		mKeyList.add(key44);
		mKeyList.add(key45);
		mKeyList.add(key46);
		mKeyList.add(key47);
		mKeyList.add(key48);
		return mKeyList;
	}

	/**
	 * 方法：getAudioKey 用途：DIY音响时返回的供用户选择的按键集合
	 */
	public List<Key> getAudioKey() {
		mKeyList.clear();
		key1 = new Key("打开", 0, 800, false);
		key2 = new Key("关闭", 0, 4000, false);
		key3 = new Key("静音", 0, 804, false);
		key4 = new Key("音量+", 0, 809, false);
		key5 = new Key("音量-", 0, 810, false);
		key6 = new Key("OK", 0, 817, false);
		key7 = new Key("上翻", 0, 818, false);
		key8 = new Key("下翻", 0, 819, false);
		key9 = new Key("左翻", 0, 820, false);
		key10 = new Key("右翻", 0, 821, false);
		key11 = new Key("菜单", 1, 822, false);
		key12 = new Key("前进", 1, 824, false);
		key13 = new Key("后退", 1, 825, false);
		key14 = new Key("暂停/播放", 1, 826, false);
		key15 = new Key("停止", 1, 827, false);
		key16 = new Key("顶部", 1, 830, false);
		key17 = new Key("底部", 1, 831, false);
		key18 = new Key("标题", 1, 840, false);
		key19 = new Key("声道", 1, 844, false);
		key20 = new Key("第二电源", 1, 1800, false);
		key21 = new Key("数字", 1, 2002, false);
		// key22 = new Key("扩展", 1, 2003, false);
		// key23 = new Key("自定义——圆形", 0, -100, false);
		// key24 = new Key("自定义——椭圆", 0, -99, false);
		// key25 = new Key("自定义——方形", 0, -98, false);
		// key26 = new Key("自定义——红色", 0, -97, false);
		// key27 = new Key("自定义——橙色", 0, -96, false);
		// key28 = new Key("自定义——黄色", 0, -95, false);
		// key29 = new Key("自定义——绿色", 0, -94, false);
		// key30 = new Key("自定义——蓝色", 0, -93, false);
		// key31 = new Key("自定义——青色", 0, -92, false);
		// key32 = new Key("自定义——紫色", 0, -91, false);
		key33 = new Key("数字0", 1, 0, false);
		key34 = new Key("数字1", 1, 1, false);
		key35 = new Key("数字2", 1, 2, false);
		key36 = new Key("数字3", 1, 3, false);
		key37 = new Key("数字4", 1, 4, false);
		key38 = new Key("数字5", 1, 5, false);
		key39 = new Key("数字6", 1, 6, false);
		key40 = new Key("数字7", 1, 7, false);
		key41 = new Key("数字8", 1, 8, false);
		key42 = new Key("数字9", 1, 9, false);
		mKeyList.add(key1);
		mKeyList.add(key2);
		mKeyList.add(key3);
		mKeyList.add(key4);
		mKeyList.add(key5);
		mKeyList.add(key6);
		mKeyList.add(key7);
		mKeyList.add(key8);
		mKeyList.add(key9);
		mKeyList.add(key10);
		mKeyList.add(key11);
		mKeyList.add(key12);
		mKeyList.add(key13);
		mKeyList.add(key14);
		mKeyList.add(key15);
		mKeyList.add(key16);
		mKeyList.add(key17);
		mKeyList.add(key18);
		mKeyList.add(key19);
		mKeyList.add(key20);
		mKeyList.add(key21);
		// mKeyList.add(key22);
		// mKeyList.add(key23);
		// mKeyList.add(key24);
		// mKeyList.add(key25);
		// mKeyList.add(key26);
		// mKeyList.add(key27);
		// mKeyList.add(key28);
		// mKeyList.add(key29);
		// mKeyList.add(key30);
		// mKeyList.add(key31);
		// mKeyList.add(key32);
		mKeyList.add(key33);
		mKeyList.add(key34);
		mKeyList.add(key35);
		mKeyList.add(key36);
		mKeyList.add(key37);
		mKeyList.add(key38);
		mKeyList.add(key39);
		mKeyList.add(key40);
		mKeyList.add(key41);
		mKeyList.add(key42);
		return mKeyList;

	}

	/**
	 * 方法：getCameraKey 用途：DIY相机时返回的供用户选择的按键集合
	 */
	public List<Key> getCameraKey() {
		mKeyList.clear();
		key1 = new Key("打开", 0, 800, false);
		key2 = new Key("关闭", 0, 4000, false);
		key3 = new Key("OK", 0, 817, false);
		key4 = new Key("上翻", 0, 818, false);
		key5 = new Key("下翻", 0, 819, false);
		key6 = new Key("左翻", 0, 820, false);
		key7 = new Key("右翻", 0, 821, false);
		key8 = new Key("菜单", 1, 822, false);
		key9 = new Key("主键", 1, 852, false);
		key10 = new Key("副键", 1, 853, false);
		key11 = new Key("连续+", 1, 854, false);
		key12 = new Key("连续-", 1, 855, false);
		key13 = new Key("连续右", 1, 856, false);
		key14 = new Key("连续左", 1, 857, false);
		// key15 = new Key("扩展", 1, 2003, false);
		// key16 = new Key("自定义——圆形", 0, -100, false);
		// key17 = new Key("自定义——椭圆", 0, -99, false);
		// key18 = new Key("自定义——方形", 0, -98, false);
		// key19 = new Key("自定义——红色", 0, -97, false);
		// key20 = new Key("自定义——橙色", 0, -96, false);
		// key21 = new Key("自定义——黄色", 0, -95, false);
		// key22 = new Key("自定义——绿色", 0, -94, false);
		// key23 = new Key("自定义——蓝色", 0, -93, false);
		// key24 = new Key("自定义——青色", 0, -92, false);
		// key25 = new Key("自定义——紫色", 0, -91, false);
		// key26 = new Key("自定义——紫色", 0, -90, false);
		mKeyList.add(key1);
		mKeyList.add(key2);
		mKeyList.add(key3);
		mKeyList.add(key4);
		mKeyList.add(key5);
		mKeyList.add(key6);
		mKeyList.add(key7);
		mKeyList.add(key8);
		mKeyList.add(key9);
		mKeyList.add(key10);
		mKeyList.add(key11);
		mKeyList.add(key12);
		mKeyList.add(key13);
		mKeyList.add(key14);
		// mKeyList.add(key15);
		// mKeyList.add(key16);
		// mKeyList.add(key17);
		// mKeyList.add(key18);
		// mKeyList.add(key19);
		// mKeyList.add(key20);
		// mKeyList.add(key21);
		// mKeyList.add(key22);
		// mKeyList.add(key23);
		// mKeyList.add(key24);
		// mKeyList.add(key25);
		// mKeyList.add(key26);
		return mKeyList;

	}

	/**
	 * 方法：getHeaterKey 用途：DIY热水器时返回的供用户选择的按键集合
	 */
	public List<Key> getHeaterKey() {
		mKeyList.clear();
		key1 = new Key("打开", 0, 800, false);
		key2 = new Key("关闭", 0, 4000, false);
		key3 = new Key("频道+", 0, 807, false);
		key4 = new Key("频道-", 0, 808, false);
		key5 = new Key("音量+", 0, 809, false);
		key6 = new Key("音量-", 0, 810, false);
		key7 = new Key("温度+", 1, 811, false);
		key8 = new Key("温度-", 1, 812, false);
		key9 = new Key("放大", 0, 813, false);
		key10 = new Key("缩小", 0, 814, false);
		key11 = new Key("OK", 0, 817, false);
		key12 = new Key("上翻", 0, 818, false);
		key13 = new Key("下翻", 0, 819, false);
		key14 = new Key("左翻", 0, 820, false);
		key15 = new Key("右翻", 0, 821, false);
		key16 = new Key("前进", 1, 824, false);
		key17 = new Key("后退", 1, 825, false);
		key18 = new Key("暂停/播放", 1, 826, false);
		key19 = new Key("停止", 1, 827, false);
		key20 = new Key("顶部", 1, 830, false);
		key21 = new Key("底部", 1, 831, false);
		key22 = new Key("连续+", 1, 854, false);
		key23 = new Key("连续-", 1, 855, false);
		key24 = new Key("连续右", 1, 856, false);
		key25 = new Key("连续左", 1, 857, false);
		key26 = new Key("数字", 1, 2002, false);
		// key27 = new Key("扩展", 1, 2003, false);
		// key28 = new Key("自定义——圆形", 0, -100, false);
		// key29 = new Key("自定义——椭圆", 0, -99, false);
		// key30 = new Key("自定义——方形", 0, -98, false);
		// key31 = new Key("自定义——红色", 0, -97, false);
		// key32 = new Key("自定义——橙色", 0, -96, false);
		// key33 = new Key("自定义——黄色", 0, -95, false);
		// key34 = new Key("自定义——绿色", 0, -94, false);
		// key35 = new Key("自定义——蓝色", 0, -93, false);
		// key36 = new Key("自定义——青色", 0, -92, false);
		// key37 = new Key("自定义——紫色", 0, -91, false);
		key38 = new Key("记忆键", 0, -90, false);
		key39 = new Key("数字0", 1, 0, false);
		key40 = new Key("数字1", 1, 1, false);
		key41 = new Key("数字2", 1, 2, false);
		key42 = new Key("数字3", 1, 3, false);
		key43 = new Key("数字4", 1, 4, false);
		key44 = new Key("数字5", 1, 5, false);
		key45 = new Key("数字6", 1, 6, false);
		key46 = new Key("数字7", 1, 7, false);
		key47 = new Key("数字8", 1, 8, false);
		key48 = new Key("数字9", 1, 9, false);
		mKeyList.add(key1);
		mKeyList.add(key2);
		mKeyList.add(key3);
		mKeyList.add(key4);
		mKeyList.add(key5);
		mKeyList.add(key6);
		mKeyList.add(key7);
		mKeyList.add(key8);
		mKeyList.add(key9);
		mKeyList.add(key10);
		mKeyList.add(key11);
		mKeyList.add(key12);
		mKeyList.add(key13);
		mKeyList.add(key14);
		mKeyList.add(key15);
		mKeyList.add(key16);
		mKeyList.add(key17);
		mKeyList.add(key18);
		mKeyList.add(key19);
		mKeyList.add(key20);
		mKeyList.add(key21);
		mKeyList.add(key22);
		mKeyList.add(key23);
		mKeyList.add(key24);
		mKeyList.add(key25);
		mKeyList.add(key26);
		// mKeyList.add(key27);
		// mKeyList.add(key28);
		// mKeyList.add(key29);
		// mKeyList.add(key30);
		// mKeyList.add(key31);
		// mKeyList.add(key32);
		// mKeyList.add(key33);
		// mKeyList.add(key34);
		// mKeyList.add(key35);
		// mKeyList.add(key36);
		// mKeyList.add(key37);
		mKeyList.add(key38);
		mKeyList.add(key39);
		mKeyList.add(key40);
		mKeyList.add(key41);
		mKeyList.add(key42);
		mKeyList.add(key43);
		mKeyList.add(key44);
		mKeyList.add(key45);
		mKeyList.add(key46);
		mKeyList.add(key47);
		mKeyList.add(key48);
		return mKeyList;
	}

	/**
	 * 方法：getDVDKey 用途：DIYDVD时返回的供用户选择的按键集合
	 */
	public List<Key> getDVDKey() {
		mKeyList.clear();
		key1 = new Key("打开", 0, 800, false);
		key2 = new Key("关闭", 0, 4000, false);
		key3 = new Key("静音", 0, 804, false);
		key4 = new Key("返回", 0, 806, false);
		key5 = new Key("音量+", 0, 809, false);
		key6 = new Key("音量-", 0, 810, false);
		key7 = new Key("OK", 0, 817, false);
		key8 = new Key("上翻", 0, 818, false);
		key9 = new Key("下翻", 0, 819, false);
		key10 = new Key("左翻", 0, 820, false);
		key11 = new Key("右翻", 0, 821, false);
		key12 = new Key("菜单", 0, 822, false);
		key13 = new Key("前进", 0, 824, false);
		key14 = new Key("后退", 0, 825, false);
		key15 = new Key("暂停/播放", 0, 826, false);
		key16 = new Key("停止", 0, 827, false);
		// key17 = new Key("顶部", 1, 830, false);
		// key18 = new Key("底部", 1, 831, false);
		key19 = new Key("开/关仓", 0, 839, false);
		// key20 = new Key("标题", 1, 840, false);
		// key21 = new Key("+10", 0, 841, false);
		key22 = new Key("语言", 1, 842, false);
		key23 = new Key("屏幕", 1, 843, false);
		key24 = new Key("声道", 1, 844, false);
		key25 = new Key("字幕", 1, 845, false);
		key26 = new Key("慢放", 1, 851, false);
		// key27 = new Key("连续+", 1, 854, false);
		// key28 = new Key("连续-", 1, 855, false);
		// key29 = new Key("连续右", 1, 856, false);
		// key30 = new Key("连续左", 1, 857, false);
		// key31 = new Key("弹出菜单", 1, 1012, false);
		// key32 = new Key("第二电源", 1, 1800, false);
		key33 = new Key("收藏", 0, 2001, false);
		key34 = new Key("数字", 0, 2002, false);
		// key35 = new Key("扩展", 1, 2003, false);
		// key36 = new Key("自定义——圆形", 0, -100, false);
		// key37 = new Key("自定义——椭圆", 0, -99, false);
		// key38 = new Key("自定义——方形", 0, -98, false);
		// key39 = new Key("自定义——红色", 0, -97, false);
		// key40 = new Key("自定义——橙色", 0, -96, false);
		// key41 = new Key("自定义——黄色", 0, -95, false);
		// key42 = new Key("自定义——绿色", 0, -94, false);
		// key43 = new Key("自定义——蓝色", 0, -93, false);
		// key44 = new Key("自定义——青色", 0, -92, false);
		// key45 = new Key("自定义——紫色", 0, -91, false);
		// key46 = new Key("记忆键", 0, -90, false);
		key47 = new Key("数字0", 0, 0, false);
		key48 = new Key("数字1", 0, 1, false);
		key49 = new Key("数字2", 0, 2, false);
		key50 = new Key("数字3", 0, 3, false);
		key51 = new Key("数字4", 0, 4, false);
		key52 = new Key("数字5", 0, 5, false);
		key53 = new Key("数字6", 0, 6, false);
		key54 = new Key("数字7", 0, 7, false);
		key55 = new Key("数字8", 0, 8, false);
		key56 = new Key("数字9", 0, 9, false);
		mKeyList.add(key1);
		mKeyList.add(key2);
		mKeyList.add(key3);
		mKeyList.add(key4);
		mKeyList.add(key5);
		mKeyList.add(key6);
		mKeyList.add(key7);
		mKeyList.add(key8);
		mKeyList.add(key9);
		mKeyList.add(key10);
		mKeyList.add(key11);
		mKeyList.add(key12);
		mKeyList.add(key13);
		mKeyList.add(key14);
		mKeyList.add(key15);
		mKeyList.add(key16);
		// mKeyList.add(key17);
		// mKeyList.add(key18);
		mKeyList.add(key19);
		// mKeyList.add(key20);
		// mKeyList.add(key21);
		mKeyList.add(key22);
		mKeyList.add(key23);
		mKeyList.add(key24);
		mKeyList.add(key25);
		mKeyList.add(key26);
		// mKeyList.add(key27);
		// mKeyList.add(key28);
		// mKeyList.add(key29);
		// mKeyList.add(key30);
		// mKeyList.add(key31);
		// mKeyList.add(key32);
		mKeyList.add(key33);
		mKeyList.add(key34);
		// mKeyList.add(key35);
		// mKeyList.add(key36);
		// mKeyList.add(key37);
		// mKeyList.add(key38);
		// mKeyList.add(key39);
		// mKeyList.add(key40);
		// mKeyList.add(key41);
		// mKeyList.add(key42);
		// mKeyList.add(key43);
		// mKeyList.add(key44);
		// mKeyList.add(key45);
		// mKeyList.add(key46);
		mKeyList.add(key47);
		mKeyList.add(key48);
		mKeyList.add(key49);
		mKeyList.add(key50);
		mKeyList.add(key51);
		mKeyList.add(key52);
		mKeyList.add(key53);
		mKeyList.add(key54);
		mKeyList.add(key55);
		mKeyList.add(key56);
		return mKeyList;
	}

	/**
	 * 方法：getSocketKey 用途：DIY插座时返回的供用户选择的按键集合
	 */
	public List<Key> getSocketKey() {
		mKeyList.clear();
		key1 = new Key("打开", 0, 800, false);
		key2 = new Key("关闭", 0, 4000, false);
		mKeyList.add(key1);
		mKeyList.add(key2);
		return mKeyList;

	}

	/**
	 * 方法：getLightKey 用途：DIY智能灯时返回的供用户选择的按键集合
	 */
	public List<Key> getLightKey() {

		mKeyList.clear();
		key1 = new Key("打开", 0, 800, false);
		key2 = new Key("关闭", 0, 4000, false);
		key3 = new Key("连续+", 1, 854, false);
		key4 = new Key("连续-", 1, 855, false);
		key5 = new Key("连续右", 1, 856, false);
		key6 = new Key("连续左", 1, 857, false);
		key7 = new Key("数字", 1, 2002, false);
		// key8 = new Key("扩展", 1, 2003, false);
		// key9 = new Key("自定义——圆形", 0, -100, false);
		// key10 = new Key("自定义——椭圆", 0, -99, false);
		// key11 = new Key("自定义——方形", 0, -98, false);
		// key12 = new Key("自定义——红色", 0, -97, false);
		// key13 = new Key("自定义——橙色", 0, -96, false);
		// key14 = new Key("自定义——黄色", 0, -95, false);
		// key15 = new Key("自定义——绿色", 0, -94, false);
		// key16 = new Key("自定义——蓝色", 0, -93, false);
		// key17 = new Key("自定义——青色", 0, -92, false);
		// key18 = new Key("自定义——紫色", 0, -91, false);
		key19 = new Key("记忆键", 0, -90, false);
		key20 = new Key("数字0", 1, 0, false);
		key21 = new Key("数字1", 1, 1, false);
		key22 = new Key("数字2", 1, 2, false);
		key23 = new Key("数字3", 1, 3, false);
		key24 = new Key("数字4", 1, 4, false);
		key25 = new Key("数字5", 1, 5, false);
		key26 = new Key("数字6", 1, 6, false);
		key27 = new Key("数字7", 1, 7, false);
		key28 = new Key("数字8", 1, 8, false);
		key29 = new Key("数字9", 1, 9, false);
		mKeyList.add(key1);
		mKeyList.add(key2);
		mKeyList.add(key3);
		mKeyList.add(key4);
		mKeyList.add(key5);
		mKeyList.add(key6);
		mKeyList.add(key7);
		// mKeyList.add(key8);
		// mKeyList.add(key9);
		// mKeyList.add(key10);
		// mKeyList.add(key11);
		// mKeyList.add(key12);
		// mKeyList.add(key13);
		// mKeyList.add(key14);
		// mKeyList.add(key15);
		// mKeyList.add(key16);
		// mKeyList.add(key17);
		// mKeyList.add(key18);
		mKeyList.add(key19);
		mKeyList.add(key20);
		mKeyList.add(key21);
		mKeyList.add(key22);
		mKeyList.add(key23);
		mKeyList.add(key24);
		mKeyList.add(key25);
		mKeyList.add(key26);
		mKeyList.add(key27);
		mKeyList.add(key28);
		mKeyList.add(key29);
		return mKeyList;

	}

	//
	// public List<Key> getDIYKey() {
	// mKeyList.clear();
	// key1 = new Key("打开", 0, 800, false);
	// key2 = new Key("关闭", 0, 4000, false);
	// key3 = new Key("信源", 1, 801, false);
	// key4 = new Key("信息", 0, 802, false);
	// key5 = new Key("回看", 1, 803, false);
	// key6 = new Key("静音", 0, 804, false);
	// key7 = new Key("数位", 1, 805, false);
	// key8 = new Key("返回", 0, 806, false);
	// key9 = new Key("频道+", 0, 807, false);
	// key10 = new Key("频道-", 0, 808, false);
	// key11 = new Key("音量+", 0, 809, false);
	// key12 = new Key("音量-", 0, 810, false);
	// key13 = new Key("温度+", 1, 811, false);
	// key14 = new Key("温度-", 1, 812, false);
	// key15 = new Key("放大", 0, 813, false);
	// key16 = new Key("缩小", 0, 814, false);
	// key17 = new Key("记忆键1", 1, 815, false);
	// key18 = new Key("记忆键 2", 1, 816, false);
	// key19 = new Key("OK", 0, 817, false);
	// key20 = new Key("上翻", 0, 818, false);
	// key21 = new Key("下翻", 0, 819, false);
	// key22 = new Key("左翻", 0, 820, false);
	// key23 = new Key("右翻", 0, 821, false);
	// key24 = new Key("菜单", 1, 822, false);
	// key25 = new Key("退出", 1, 823, false);
	// key26 = new Key("前进", 1, 824, false);
	// key27 = new Key("后退", 1, 825, false);
	// key28 = new Key("暂停/播放", 1, 826, false);
	// key29 = new Key("停止", 0, 827, false);
	// key30 = new Key("上一个", 0, 828, false);
	// key31 = new Key("下一个", 0, 829, false);
	// key32 = new Key("顶部", 1, 830, false);
	// key33 = new Key("底部", 1, 831, false);
	// key34 = new Key("模式", 1, 832, false);
	// key35 = new Key("风量", 1, 833, false);
	// key36 = new Key("左右扫风", 0, 834, false);
	// key37 = new Key("上下扫风", 0, 835, false);
	// key38 = new Key("摇头", 1, 836, false);
	// key39 = new Key("风类", 1, 837, false);
	// key40 = new Key("风速", 1, 838, false);
	// key41 = new Key("开/关仓", 0, 839, false);
	// key42 = new Key("标题", 1, 840, false);
	// key43 = new Key("+10", 1, 841, false);
	// key44 = new Key("语言", 1, 842, false);
	// key45 = new Key("屏幕", 1, 843, false);
	// key46 = new Key("声道", 1, 844, false);
	// key47 = new Key("字幕", 1, 845, false);
	// key48 = new Key("分屏", 1, 847, false);
	// key49 = new Key("冻结", 1, 848, false);
	// key50 = new Key("重置", 1, 849, false);
	// key51 = new Key("视频", 1, 850, false);
	// key52 = new Key("慢放", 1, 851, false);
	// key53 = new Key("主键", 1, 852, false);
	// key54 = new Key("副键", 1, 853, false);
	// key55 = new Key("连续+", 1, 854, false);
	// key56 = new Key("连续-", 1, 855, false);
	// key57 = new Key("连续右", 1, 856, false);
	// key58 = new Key("连续左", 1, 857, false);
	// key59 = new Key("空调风向", 1, 870, false);
	// key60 = new Key("灯光", 1, 871, false);
	// key61 = new Key("超强", 1, 872, false);
	// key62 = new Key("睡眠", 1, 873, false);
	// key63 = new Key("清新/换气", 1, 874, false);
	// key64 = new Key("辅热/干燥", 1, 875, false);
	// key65 = new Key("定时", 0, 876, false);
	// key66 = new Key("加湿", 1, 877, false);
	// key67 = new Key("负离子", 1, 878, false);
	// key68 = new Key("节能", 1, 879, false);
	// key69 = new Key("舒适", 1, 880, false);
	// key70 = new Key("温度显示", 1, 881, false);
	// key71 = new Key("一键冷", 0, 882, false);
	// key72 = new Key("一键热", 0, 883, false);
	// key73 = new Key("自动", 1, 900, false);
	// key74 = new Key("信号", 1, 901, false);
	// key75 = new Key("亮度", 1, 902, false);
	// key76 = new Key("电脑", 1, 903, false);
	// key77 = new Key("冷风", 1, 1000, false);
	// key78 = new Key("首页", 0, 1010, false);
	// key79 = new Key("设置", 0, 1011, false);
	// key80 = new Key("第二电源", 1, 1800, false);
	// key81 = new Key("收藏", 0, 2001, false);
	// key82 = new Key("数字", 1, 2002, false);
	// key83 = new Key("分段", 0, 3001, false);
	// key84 = new Key("辅光", 0, 3002, false);
	// key85 = new Key("亮度+", 1, 3003, false);
	// key86 = new Key("亮度-", 1, 3004, false);
	// key87 = new Key("色温+", 1, 3005, false);
	// key88 = new Key("色温-", 1, 3006, false);
	// key89 = new Key("夜灯", 0, 3007, false);
	// key90 = new Key("20%", 0, 3008, false);
	// key91 = new Key("50%", 0, 3009, false);
	// key92 = new Key("100%", 0, 3010, false);
	// key93 = new Key("渐变", 0, 3011, false);
	// key94 = new Key("色块", 0, 3012, false);
	// key95 = new Key("灯光M键", 0, 3013, false);
	// // key97 = new Key("扩展", 1, 2003, false);
	// // key98 = new Key("自定义——圆形", 0, -100, false);
	// // key99 = new Key("自定义——椭圆", 0, -99, false);
	// // key100 = new Key("自定义——方形", 0, -98, false);
	// // key101 = new Key("自定义——红色", 0, -97, false);
	// // key102 = new Key("自定义——橙色", 0, -96, false);
	// // key103 = new Key("自定义——黄色", 0, -95, false);
	// // key104 = new Key("自定义——绿色", 0, -94, false);
	// // key105 = new Key("自定义——蓝色", 0, -93, false);
	// // key106 = new Key("自定义——青色", 0, -92, false);
	// // key107 = new Key("自定义——紫色", 0, -91, false);
	// key108 = new Key("数字0", 1, 0, false);
	// key109 = new Key("数字1", 1, 1, false);
	// key110 = new Key("数字2", 1, 2, false);
	// key111 = new Key("数字3", 1, 3, false);
	// key112 = new Key("数字4", 1, 4, false);
	// key113 = new Key("数字5", 1, 5, false);
	// key114 = new Key("数字6", 1, 6, false);
	// key115 = new Key("数字7", 1, 7, false);
	// key116 = new Key("数字8", 1, 8, false);
	// key117 = new Key("数字9", 1, 9, false);
	// return mKeyList;
	// }

	/**
	 * 方法：addDIYKey 用途：将已学习的按键添加至DIY按键的集合中
	 */
	public void addDIYKey(Key key) {
		key.setIsSignLayoutShowm(0);
		mDIYKetList.add(key);
		Log.i("Tag", "添加了按键 = " + key.getName() + " " + key.getCodeValue());
	}

	public void setDIYKeyList(List<Key> keys) {
		mDIYKetList = keys;
	}

	/**
	 * 方法：getDIYKeyList 用途：获取已学习的按键列表，在完成配置，保存遥控器数据时调用本方法
	 */
	public List<Key> getDIYKeyList() {
		Log.i("wmy", "获得按键列表长度 = " + mDIYKetList.size());
		return this.mDIYKetList;
	}

	/**
	 * 方法：hex2byte 用途：将字符串转义为字节码
	 */
	public static byte[] hex2byte(String testString) {
		testString = testString.replace(" ", "");
		byte[] ret = new byte[testString.length() / 2];
		for (int i = 0; i < ret.length; i++) {
			ret[i] = Integer.decode("#" + testString.substring(2 * i, 2 * i + 2)).byteValue();
		}
		byte[] ret2 = new byte[ret.length + 2];
		ret2[0] = (byte) 0x51;
		ret2[1] = (byte) 0x40;
		for (int i = 0; i < ret.length; i++) {
			ret2[i + 2] = ret[i];
		}

		return ret2;
	}

	/**
	 * 方法：byte2HexStr 用途：将字节码转义为字符串
	 */
	public static String byte2HexStr(byte[] b) {
		String stmp = "";
		StringBuilder sb = new StringBuilder("");
		for (int n = 2; n < b.length; n++) {
			stmp = Integer.toHexString(b[n] & 0xFF);
			sb.append((stmp.length() == 1) ? "0" + stmp : stmp);
			sb.append(" ");
		}
		currentCodeValue = sb.toString().toUpperCase().trim();
		return sb.toString().toUpperCase().trim();
	}

	public String getCurrentKeyCode() {
		return currentCodeValue;
	}

}
